package com.qlzb.taskmanagement.task;


import com.qlzb.taskmanagement.vo.quartzVo.AreaUser;
import com.qlzb.taskmanagement.vo.quartzVo.AreaUserList;

public abstract class AbstractTask {
    public void run(AreaUser areaUser) {
    }
    public void  startSchedule() {
        for (AreaUser areaUser : AreaUserList.areaUsers) {
            startSchedule(areaUser);
        }
    }
    public void  startSchedule(AreaUser areaUser) {
            run(areaUser);
    }
    public boolean initLoginGetData(AreaUser areaUser){
        try {
            throw new Exception("子类必须重写！initLoginGetData！");
        } catch (Exception e) {
            e.printStackTrace();
        }
        return  false;
    }
    public void  initData() {
        for (AreaUser areaUser : AreaUserList.areaUsers) {
            initLoginGetData(areaUser);
        }
    }
}
